import request from '@/utils/request'

export function buildMenus() {
  return request({
    url: 'v1/menuMng/build',
    method: 'get'
  })
}

export function getAllMenusTree() {
  return request({
    url: 'v1/menuMng/getAllMenusTree',
    method: 'get'
  })
}

export function loadDataUrl() {
  return 'v1/menuMng/loadData'
}

export function viewMainData(data) {
  return request({
    url: 'v1/menuMng/toView',
    method: 'post',
    data
  })
}

export function addOrEdit(data) {
  return request({
    url: 'v1/menuMng/doSave',
    method: 'post',
    data
  })
}

export function del(data) {
  return request({
    url: 'v1/menuMng/doDelete',
    method: 'post',
    data
  })
}
